\documentclass{article}

\usepackage{cite}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{subcaption}
\usepackage{hyperref}
\usepackage{color}
\usepackage{epstopdf}
\usepackage{placeins}
\graphicspath{{Figures/}}

\begin{document}
\title{Lab 4: Spectral Color Mixing}
\author{Alexandra Booth \and Glenn Sweeney}

% make the title area
\maketitle

% make introduction
\section{Introduction}

The concept of spectrophotometry has already been introduced in the introduction to laboratory two.
However, in this laboratory, spectrophotometry is used to measure and investigate transmissive filters.
These filters selectively pass different wavelengths at different proportions.
With the transmissive spectrophotometer, the intrinsic transmission of the material can be calculated for each filter.

In this laboratory, the transmittances of these filters are used to compute both additive and subtractive color mixing.
Additive mixing is the process of taking multiple sources of radiation and mixing them.
This mixing can take several different forms: Spatial, temporal, and partitive mixing are just a few examples.
We use these filters to describe several light sources for additive mixing.
This is done by considering the CIE D65 illuminant as modulated by each filter.
Then, these virtual lights can be mixed together mathematically, and the results analyzed.

On the other hand, these filters are also used for subtractive mixing.
In this case, the CIE D65 illuminant is attenuated by multiple filters, and the results are analyzed.
Subtractive mixing is a fundamentally different process from additive mixing, because an initial source is repeatedly attenuated by different filters.
Because of this, very different results for additive and subtractive mixing of the same filters will be obtained.

Real subtractive mixing is also considered.
Instead of mathematically mixing each filter, they are physically stacked, and the mixture measured directly.
These results are compared and contrasted with the results from the mathematical mixtures.

\section{Procedure}

In this lab, six filters were considered.
These filters represent the primary colors of the additive mixing system, Red, Green, and Blue, and the primary colors of the subtractive mixing system, Cyan, Magenta, and Yellow.
Each filter had its transmittance measured with an EyeOne transmissive spectrophotometer.
This device uses a calibrated light source, an integrating sphere, and a detector to determine the transmittance of a transparent material.

Once the spectra were recorded, the XYZ tristimulus values, the $xy$ chromaticity coordinates, the dominant wavelength, and the excitation purity were calculated.
Equations \ref{eqt:X}, \ref{eqt:Y}, and \ref{eqt:Z} show the equations used to calculate the XYZ tristimulus values.
$T_{\lambda}$ denotes the percent transmission (scaled 0-1) as a function of wavelength.
$S_{\lambda}$ denotes the source's intensity as a function of wavelength.
$\bar{x}_{\lambda}$, $\bar{y}_{\lambda}$, and $\bar{z}_{\lambda}$ are the color matching functions as a function of wavelength.

\begin{equation}
X = k \int T_{\lambda} S_{\lambda} \bar{x}_{\lambda} \,\mathrm{d}\lambda
\label{eqt:X}
\end{equation}

\begin{equation}
Y =  k \int T_{\lambda} S_{\lambda} \bar{y}_{\lambda} \,\mathrm{d}\lambda
\label{eqt:Y}
\end{equation}

\begin{equation}
Z =  k \int T_{\lambda} S_{\lambda} \bar{z}_{\lambda} \,\mathrm{d}\lambda
\label{eqt:Z}
\end{equation}

Where

\begin{equation}
k =  \frac{100}{ \int S_{\lambda} \bar{y}_{\lambda} \,\mathrm{d}\lambda} \nonumber
\end{equation}

Equations \ref{eqt:xchromaticity} and \ref{eqt:ychromaticity} show the equations used to calculate the $xy$ chromaticity coordinates.
They require the tristimulus values which is why they were calculated first.

\begin{equation}
x = \frac{X}{X+Y+Z}
\label{eqt:xchromaticity}
\end{equation}

\begin{equation}
y = \frac{Y}{X+Y+Z}
\label{eqt:ychromaticity}
\end{equation}

The dominant wavelength was determined by calculating the equation to the line made between the source's and the filter's chromaticity coordinates.
By observation, the dominant wavelength location on the spectral locus was then recorded.
Equation \ref{eqt:purity} shows the equation used to calculated the excitation purity (P$_{e}$).
When calculating purity, only $x$ or only $y$ chromaticity coordinates are needed.
In the equation, the subscript $w$ indicates the coordinate for the $w$hite point while the subscript $d$ indicates the coordinate for the $d$ominant wavelength.

\begin{equation}
P_{e} = \frac{x - x_{w}}{x_{d} - x_{w}} = \frac{y - y_{w}}{y_{d} - y_{w}}
\label{eqt:purity}
\end{equation}

The color mixing analysis required the computation of the $xy$ chromaticity coordinates via subtactive processes, additive processes, and finally raw measurement processes.
The physical overlap of the two filters undergoes the same calculations as the mentioned above.
The subtractive process takes the transmission spectrum from the red filter and multiplies it wavelength per wavelenght with the green filter.
This is because the resultant proportion of the light transmitted from one filter to the other is the percentage at the wavelength with the percentage of the other at that wavelength.
With this new spectra, the tristimulus values and thus the chromaticity coordinates can then be calculated.
For the additive process, the math is performed with the tristimulus values.
Because the mixture is 50$\%$ red and 50$\%$ green, the red and green tristimulus values are averaged.
The chromaticity coordinates are then calculated with these new tristimulus vaues.

\section{Results and Analysis}

\FloatBarrier

A D65 iluminant was used to measure the percent transmission when a filter was incerted.
It is this spectra that the percent transmission is determined from as well as the color analysis calculations.
Figure \ref{fig:d65} shows the area normalized spectral power distribution for the CIE D65 illuminant.

\begin{figure}[h]
\centering
\includegraphics[width=0.6\textwidth]{d65_spec.eps}
\caption{Spectral Power Plot of the CIE 1931 D65 illuminant.}
\label{fig:d65}
\end{figure}

Figure \ref{fig:filter_transmittance} shows the percent transmission of each filter considered in this experiment.
The perceieved color of the filter is determined by the wavelengths that it transmits.
This means that for a filter to appear ``red", it must absorb the middle and short wavelenghts while allowing the long wavelengths to be transmitted.
It can be observed that each of the additive primaries and each of the subtractive primaries transmitted the generally anticipated visible wavelenghts.
The efficientciy to which this was done was not equal for all filters.
While the red, yellow, and green filter appeared to be very selective, the cyan, magenta, and blue were less selective.
The cyan in particular has a very irrecular transmission.
A good cyan filter would not tranmist the longest wavelengths.
The filter that was examined did pass some long wavelengths, particularly at the edge of the spectrum.

\begin{figure}[h]
\centering
\includegraphics[width=0.9\textwidth]{filter_transmittance.eps}
\caption{Measured transmittances of six colored filters. Additionally, a filter stack is considered.}
\label{fig:filter_transmittance}
\end{figure}

The spectrum for the filters that were overlapped, red and green, show a substantial loss in transmitted light.
This is as was expected.
The only light that is transmitted is the areas that exist under both the red and green curves.
Because of how little overlap there is between the two spectral curves, there is little light that is transmitted.

A color stimulus for each filter was calculated using the CIE standard illuminant D65.
By calculating the spectrum that would be viewed by a sensing device of the illuminant after transmitting through the filter, a color stimulus, and thus a chromaticity, can be determined.
These chromaticities are shown in Figure \ref{fig:filter_dom_wave_xy}.
Each plotted point is the $xy$ chormaticity points for the filter that corresponds to the color of the point.
The black point is the D65 illuminant.
The resultant chromaticity coordinates can be seen in table \ref{tbl:filtercc}.

\begin{table}[!t]
\caption{Calculated $xy$ chromaticity coordinates for each of the filters.}
\label{tbl:filtercc}
\centering
\begin{tabular}{|c|c|c|}
\hline
Filter & \multicolumn{2}{|c|}{Chromaticity Coordinates}  \\ \cline{2-3}
&	x	&	y	\\ \hline
red	&	0.675931495	&	0.320435166	\\ \hline
green	&	0.357722772	&	0.629361815	\\ \hline
blue	&	0.163272874	&	0.201835605	\\ \hline
cyan	&	0.25262109	&	0.299690257	\\ \hline
magenta	&	0.344987582	&	0.139453689	\\ \hline
yellow	&	0.428561131	&	0.519324868	\\ \hline
\end{tabular}
\end{table}

For each filter, the dominant wavelengths and purities were calculated.
These values are shown graphically in Figure \ref{fig:filter_dom_wave_xy} with the blue lines that travel from the D65 coordinate to each of the filters' coordinates
The exception is the magenta filter.
Because the magenta filter as a dominant wavelength plot path to the purple line, the line is instead drawn from the filter's coordinate, through the D65 source cooridinate, and to the spectral locus.
The resultant $xy$ chromaticity coordinates for the dominant wavelength, its associated wavelength in $nm$, and the purity, can all be seen in table \ref{tbl:filterdomwave}.

%\begin{figure}
%\centering
%\includegraphics[width=0.6\textwidth]{filter_xy.eps}
%\caption{Chromaticities in the x-y coordinate space for the color stimuli resulting from the D65 illuminant being filtered by each sample.}
%\label{fig:filter_xy}
%\end{figure}

\begin{figure}[h]
\centering
\includegraphics[width=0.6\textwidth]{filter_dom_wave_xy.eps}
\caption{Chromaticities in the x-y coordinate space for the color stimuli resulting from the D65 illuminant being filtered by each sample. Graphic extrapolation of the dominant wavelength for each of the filters measured are denoted by the blue plot lines. The illuminant used for calculation is the CIE standard illuminant D65 (black lot point).}
\label{fig:filter_dom_wave_xy}
\end{figure}

\begin{table}[!t]
\caption{Dominant wavelength $xy$ coordinates and associated wavelength in $nm$ as well as the purity for each of the filters.}
\label{tbl:filterdomwave}
\centering
\begin{tabular}{|c|c|c|c|c|}
\hline
Filter &  \multicolumn{2}{|c|}{Dominant Wavelength Coordinates} & Wavelength & Purity \\ \cline{2-3}
&	x	&	y	&		&		\\ \hline
red	&	0.68258	&	0.31725	&	616	&	0.98	\\ \hline
green	&	0.34451	&	0.65203	&	556	&	1.42	\\ \hline
blue	&	0.089942	&	0.83329	&	522	&	0.67	\\ \hline
cyan	&	0.052177	&	0.82516	&	517	&	0.23\\ \hline
magenta	&	0.28729	&	0.70532	&	548	&	-1.27	\\ \hline
yellow	&	0.44406	&	0.55471	&	570	&	0.88 \\ \hline
\end{tabular}
\end{table}

Figure \ref{fig:rgmix} shows the $xy$ chromaticity plots for each of the three methods for the red and green filter mixing.
It can be seen that the actual measured point drifts towards the source while the subtractive and additive mixing plot closer together and between the red filter and the green filter coordinates.
This is because the change in the luminance term will change where the plot points can be physically realized.
With both filters in place, there is very little light that is transmitted.
The less light that is transmitted, the closer it approachs black.
Black is a neutral and thus, the measured point appears closer to a neutral.
The exact $xy$ chromaticity points can be seen in table \ref{tbl:mixcc}.
Table \ref{tbl:mixdomwave} shows the dominant wavelength coordinates, associated wavelength in $nm$, and the calculated purity.

\begin{figure}
\centering
\includegraphics[width=0.6\textwidth]{mixture_dom_wave_xy.eps}
\caption{$xy$ chromaticity plot with the coordinated for the additive, subtractive, and measured results of the red and green filter combination. Graphic extrapolation for the dominant wavelength of each is drawn with blue plot lines.}
\label{fig:rgmix}
\end{figure}

\begin{table}[!t]
\caption{$xy$ chromaticity coordinates for each of the filter mixing cases.}
\label{tbl:mixcc}
\centering
\begin{tabular}{|c|c|c|}
\hline
Mixture Type & \multicolumn{2}{|c|}{Chromaticity Coordinates}  \\ \cline{2-3}
	&	x	&	y	\\ \hline
Additive	&	0.540466181	&	0.351731436	\\ \hline
Subtractive	&	0.612897486	&	0.386084465	\\ \hline
Measured	&	0.574914991	&	0.418505042	\\ \hline
\end{tabular}
\end{table}

\begin{table}[!t]
\caption{Dominant wavelength $xy$ coordinates and associated wavelength in $nm$ as well as the purity for each of the filter mixing cases.}
\label{tbl:mixdomwave}
\centering
\begin{tabular}{|c|c|c|c|c|}
\hline
Mixture Type &  \multicolumn{2}{|c|}{Dominant Wavelength Coordinates} & Wavelength & Purity \\ \cline{2-3}
	&	x	&	y	&	&	\\ \hline
Additive	&	0.58095	&	0.41845	&	591	&	0.85	\\ \hline
Subtractive	&	0.61298	&	0.38649	&	597	&	0.99	\\ \hline
Measured	&	0.64016	&	0.35943	&	603	&	0.80	\\ \hline
\end{tabular}
\end{table}

\FloatBarrier

\section{Conclusions}

The $xy$ chromaticity coordinates can be calculated from a spectrum by first calculating the tritimulus values.
From these chromaticity coordinates the dominant wavelength and then the excitation purity can be calculated.
The purity of a color ploted in $xy$ chromaticity space is larger as the point plots closer to the locus, and smaller as it plots closer to the source's $xy$ chromaticity coordinates.
And while both the subtractive method and the additive method yeild similar results in the $xy$ chromaticity chart, a real life measurement will drift towards neutral as a response to the loss in transmitted intensity.

\end{document}
